package com.rfid.acs.bean;

import android.os.Parcel;
import android.os.Parcelable;

public class LibraryBean implements Parcelable {

    private int lib_id;

    private String lib_name;

    private String lib_no;

    private int port;

    private String lib_ip;

    private String search_url;

    private String timestamp;

    public String getSearch_url() {
        return search_url;
    }

    public void setSearch_url(String search_url) {
        this.search_url = search_url;
    }

    public int getLib_id() {
        return lib_id;
    }

    public void setLib_id(int lib_id) {
        this.lib_id = lib_id;
    }

    public String getLib_name() {
        return lib_name;
    }

    public void setLib_name(String lib_name) {
        this.lib_name = lib_name;
    }

    public String getLib_no() {
        return lib_no;
    }

    public void setLib_no(String lib_no) {
        this.lib_no = lib_no;
    }

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }

    public String getLib_ip() {
        return lib_ip;
    }

    public void setLib_ip(String lib_ip) {
        this.lib_ip = lib_ip;
    }

    public String getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(String timestamp) {
        this.timestamp = timestamp;
    }


//    @Override
//    public String toString() {
//        return getLib_name();
//    }

    @Override
    public String toString() {
        return "LibraryBean{" +
                "lib_id=" + lib_id +
                ", lib_name='" + lib_name + '\'' +
                ", lib_no='" + lib_no + '\'' +
                ", port=" + port +
                ", lib_ip='" + lib_ip + '\'' +
                ", search_url='" + search_url + '\'' +
                ", timestamp='" + timestamp + '\'' +
                '}';
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.lib_id);
        dest.writeString(this.lib_name);
        dest.writeString(this.lib_no);
        dest.writeInt(this.port);
        dest.writeString(this.lib_ip);
        dest.writeString(this.search_url);
        dest.writeString(this.timestamp);
    }

    public LibraryBean() {
    }

    protected LibraryBean(Parcel in) {
        this.lib_id = in.readInt();
        this.lib_name = in.readString();
        this.lib_no = in.readString();
        this.port = in.readInt();
        this.lib_ip = in.readString();
        this.search_url = in.readString();
        this.timestamp = in.readString();
    }

    public static final Creator<LibraryBean> CREATOR = new Creator<LibraryBean>() {
        @Override
        public LibraryBean createFromParcel(Parcel source) {
            return new LibraryBean(source);
        }

        @Override
        public LibraryBean[] newArray(int size) {
            return new LibraryBean[size];
        }
    };
}
